package com.worthtech.billportal.service.imp;

import java.util.List;

import com.worthtech.billportal.bean.BillShop;
import com.worthtech.billportal.bean.BillShopbank;
import com.worthtech.billportal.bean.BillTradecode;
import com.worthtech.billportal.dao.ShopDAO;
import com.worthtech.billportal.exception.SCException;
import com.worthtech.billportal.service.ShopService;

public class ShopServiceImp implements ShopService {

	private ShopDAO shopDAO;

	public ShopDAO getShopDAO() {
		return shopDAO;
	}

	public void setShopDAO(ShopDAO shopDAO) {
		this.shopDAO = shopDAO;
	}

	public String getCount(String tableName, String condition) {
		return this.getShopDAO().getCount(tableName, condition);
	}

	public List getListByHQL(String tableName, int startPage, int perNo,
			String orderby) {
		return this.getShopDAO().getListByHQL(tableName, startPage, perNo,
				orderby);
	}

	public void addShop(BillShop shop) throws SCException {
		this.getShopDAO().addShop(shop);
	}

	public void updateShop(BillShop shop) throws SCException {
		this.getShopDAO().updateShop(shop);
	}

	public void delShop(BillShop shop) throws SCException {
		this.getShopDAO().delShop(shop);
	}

	public void addBank(BillShopbank shop) throws SCException {
		this.getShopDAO().addBank(shop);
	}

	public void updateBank(BillShopbank shop) throws SCException {
		this.getShopDAO().updateBank(shop);
	}

	public void delBank(BillShopbank shop) throws SCException {
		this.getShopDAO().delBank(shop);
	}

	public void addTrade(BillTradecode shop) throws SCException {
		this.getShopDAO().addTrade(shop);
	}

	public void updateTrade(BillTradecode shop) throws SCException {
		this.getShopDAO().updateTrade(shop);
	}

	public void delTrade(BillTradecode shop) throws SCException {
		this.getShopDAO().delTrade(shop);
	}
	
	public void delTable(String tablename,String sql) throws SCException{
		this.getShopDAO().delTable(tablename, sql);
	}

	public Object[][] getParams(String sql) {
		return this.getShopDAO().getParams(sql);
	}
}
